package com.example.mappers;


import com.example.data.holidays.HolidaysDO;
import org.springframework.jdbc.core.RowMapper;

import com.example.data.holidays.Holidays;
import java.sql.ResultSet;
import java.sql.SQLException;
public class HolidaysRowMapper implements RowMapper<Holidays> {
        @Override
        public Holidays mapRow(ResultSet rs,int i) throws SQLException {
            Holidays holidaysDo = new HolidaysDO();
            holidaysDo.setEmpID(rs.getLong("empId"));
            holidaysDo.setAvailableHolidays(rs.getInt("availableHolidays"));// does it need to change into integer
            holidaysDo.setRestHolidays(rs.getInt("restHolidays"));
            return holidaysDo;
        }
}

